DECLARE SUB preparation2 ()
DECLARE SUB preparation1 ()
DECLARE SUB delay (a%)
DECLARE SUB preparewriter (sect%)
DECLARE SUB writetext (xtp%, lne%, ag%, bg%, clr%)
DECLARE SUB physix (toing%, pn%)
DECLARE SUB palget ()
DECLARE SUB fadefromcolor (a, c, t, r, g, B)
DECLARE SUB fadetocolor (a, c, t, r, g, B)
DECLARE SUB fadetocolorscale (a, c, t, r, g, B)
DECLARE SUB startcpumeter ()
DECLARE SUB endcpumeter ()
DECLARE SUB getnumbers ()
DECLARE SUB donumbers (sect%, cn%)
DECLARE SUB writenumbers (boing%)
DECLARE SUB preperation1 ()
DECLARE SUB preperation2 ()
DECLARE SUB barend ()
DECLARE SUB getcolors (sect%)

RANDOMIZE TIMER

DIM SHARED txt%(200)
DIM SHARED ltr%(16384)
DIM SHARED xp%(20), x(20), v(20), ep(20), epe(20), f(20), t(20), el(20), kat%(20), c%(20), ff(20), fps%(20), clrs%(10)
DIM SHARED r(255), g(255), B(255)
DIM SHARED cnt%(3072)
DIM SHARED nmb%(2560)
DIM SHARED p256%(64)
DIM SHARED spg%(5), pg%(5), sppg(5)

CLS

LOCATE 5, 1: INPUT "Vsync: 0) Enabled  -  1) enabled with CPU Meter  -  2) Partially disabled  -  3)Disabled totally (Choose enabled if you run it for the 1st time.. choose then disabled to read fast the messages..)"; vsync%

SCREEN 13

'4=disabled developers mode 3=disabled totally 2=partially disabled
'1=enabled with CPU meter 0=enabled

preparation1
preparation2

sect% = 1
113

sppg(1) = 238: pg%(1) = 1: spg%(1) = 7
sppg(2) = 1878: pg%(2) = 1: spg%(2) = 66
sppg(3) = 115333: pg%(3) = 1: spg%(3) = 246
sppg(4) = 15256 + 1878: pg%(4) = 1: spg%(4) = 426
sppg(5) = 172259: pg%(5) = 1: spg%(5) = 248

donumbers sect%, 0
donumbers sect%, 1

skata% = 0
pp% = -1

pg%(1) = 1
GOTO 112


1111

clrs%(1) = 16
clrs%(2) = 0
clrs%(3) = 64
clrs%(4) = 32
clrs%(5) = 48
clrs%(6) = 96
clrs%(7) = 0
clrs%(8) = 0
clrs%(9) = 0
clrs%(10) = 32

sppg(1) = 1: pg%(1) = 1: spg%(1) = 1

REM ===================== Menu =====================

DO WHILE xb% >= 0

LINE (xb% + 82, 175)-(xb% + 82, 180), 0: xb% = xb% - 1
IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8

LOOP
pb% = 0: xb% = 0

preparewriter 1

pg%(1) = 1
pp% = 1

FOR i% = 1 TO 10
pp% = -pp%
xp%(i%) = pp% * (320 + i% * 100)
x(i%) = pp% * (320 + i% * 100)
f(i%) = 0
v(i%) = -13 * pp%
t(i%) = .15
el(i%) = 8
kat%(i%) = -pp%
ff(i%) = 1.5
NEXT i%



REM ------------- Menu Output --------------

att% = 0
fps% = 0

DO WHILE fps% < 330

fps% = fps% + 1
py% = -320

FOR i% = 1 TO 10
py% = py% + 320
physix 2, i%
writetext xp%(i%), i%, 1, 20, clrs%(i%)
NEXT i%

IF vsync% = 1 THEN endcpumeter
IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8
IF vsync% = 1 THEN startcpumeter


LOOP
WHILE INKEY$ <> "": WEND

endcpumeter


REM ----------------- Da keys again -------------------

101

k$ = INKEY$

WHILE k$ = ""
k$ = " "
WEND

WHILE ASC(k$) > 48 AND ASC(k$) < 56
sect% = ASC(k$) - 48
k$ = INKEY$
GOTO 102
WEND

IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8

GOTO 101

102


REM ---------------- Fevximo -----------------

pp% = 1
FOR i% = 1 TO 10
pp% = -pp%
v(i%) = -7 * pp%
ep(i%) = .2 * pp%
NEXT i%


REM ------------- Menu Output 2---------------

att% = 0
fps% = 0

DO WHILE fps% < 200

fps% = fps% + 1
py% = -320

FOR i% = 1 TO 10
py% = py% + 320
physix 3, i%
writetext xp%(i%), i%, 1, 20, clrs%(i%)
NEXT i%

IF vsync% = 1 THEN endcpumeter
IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8
IF vsync% = 1 THEN startcpumeter

LOOP
WHILE INKEY$ <> "": WEND
endcpumeter

IF sect% = 6 THEN barend: END

GOTO 113


11
REM ===================== Note reader =====================

DO

111

REM ----------------- Da keys --------------------

k$ = INKEY$

WHILE k$ = ""
k$ = " "
WEND

WHILE k$ = "." OR k$ = ">"
pg%(sect%) = pg%(sect%) - 1: IF pg%(sect%) <= 0 THEN pg%(sect%) = 1: k$ = "": GOTO 111
pp% = 1
k$ = INKEY$
GOTO 112
WEND


WHILE k$ = "," OR k$ = "<"
pg%(sect%) = pg%(sect%) + 1: IF pg%(sect%) = spg%(sect%) + 1 THEN pg%(sect%) = spg%(sect%): k$ = "": GOTO 111
pp% = -1
k$ = INKEY$
GOTO 112
WEND

WHILE ASC(k$) > 47 AND ASC(k$) < 58
IF k$ <> "0" THEN ppg = (ASC(k$) - 49) / 9 ELSE ppg = 1
mpg% = pg%(sect%)
pg%(sect%) = ppg * spg%(sect%)
IF pg%(sect%) = 0 THEN pg%(sect%) = 1
IF pg%(sect%) = mpg% THEN k$ = INKEY$: GOTO 111
IF pg%(sect%) < mpg% THEN pp% = 1 ELSE pp% = -1
k$ = INKEY$
GOTO 112
WEND


WHILE k$ = "q" OR k$ = "Q"
k$ = "z"
GOTO 112
WEND

WHILE k$ = "x" OR k$ = "X"
END
WEND

IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8

GOTO 111

112


dpg = 1 - (spg%(sect%) - pg%(sect%)) / spg%(sect%)
pb% = dpg * 157

IF skata% = 1 THEN GOTO 74

xp%(12) = 450
x(12) = 450
v(12) = -7.64
ep(12) = .1

74

IF skata% = 0 THEN GOTO 75
IF k$ = "z" THEN ppp% = pp%: pb% = -1


REM ---------- Fevxsimo ----------------

FOR i% = 1 TO 10
ep(i%) = .2 * pp%
v(i%) = 0
NEXT i%

xp%(11) = 162
x(11) = 162
v(11) = -.1
ep(11) = .1

xp%(12) = 162
x(12) = 162
v(12) = -.025
ep(12) = .025

DO WHILE pp% * xp%(1) < 320

IF k$ = "z" THEN pp% = 1
IF pp% = 1 THEN cb% = 0 ELSE cb% = xb% \ 2 + 128
IF xb% <> pb% THEN LINE (xb% + 82, 175)-(xb% + 82, 180), cb%: xb% = xb% - pp%

IF k$ = "z" THEN pp% = ppp%
physix 3, 11
writenumbers 11

IF k$ = "z" THEN physix 3, 12: writenumbers 12

py% = -320
FOR i% = 1 TO 10
py% = py% + 320
physix 3, i%
writetext xp%(i%), i%, 1, 20, clrs%(i%)
NEXT i%

IF vsync% = 1 THEN endcpumeter
IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8
IF vsync% = 1 THEN startcpumeter
LOOP
endcpumeter

IF k$ = "z" THEN GOTO 1111


xp%(11) = xp%(11) - v(11)
x(11) = x(11) - v(11)
xp%(12) = xp%(12) - v(12)
x(12) = x(12) - v(12)

75 preparewriter sect%
getcolors sect%

REM ---------------- Toing toing ------------------

sl% = INT(RND * 5 + 1)
SELECT CASE sl%

CASE 1

fps%(1) = 460
FOR i% = 1 TO 10
xp%(i%) = -320 * pp%
x(i%) = -320 * pp%
f(i%) = 0
v(i%) = 13 * pp%
t(i%) = .15
el(i%) = 6
kat%(i%) = pp%
ff(i%) = COS((i% + 9.44) / 4.77) * (-1.5)
NEXT i%

CASE 2

fps%(2) = 450

FOR i% = 1 TO 10
xp%(i%) = -320 * pp%
x(i%) = -320 * pp%
f(i%) = 0
v(i%) = 13 * pp%
t(i%) = .15
el(i%) = 6
kat%(i%) = pp%
ff(i%) = SIN((i% + 4) / 15) * 2.5
NEXT i%

CASE 3
fps%(3) = 370

FOR i% = 1 TO 10
xp%(i%) = -320 * pp%
x(i%) = -320 * pp%
f(i%) = 0
v(i%) = 13 * pp%
t(i%) = .15
el(i%) = 7
kat%(i%) = pp%
ff(i%) = COS((i% + 5) / 13.128) * 1.75
NEXT i%

CASE 4
fps%(4) = 350

p = 1.5
FOR i% = 1 TO 10
p = -p
xp%(i%) = -320 * pp%
x(i%) = -320 * pp%
f(i%) = 0
v(i%) = 13 * pp%
t(i%) = .15
el(i%) = 7
kat%(i%) = pp%
ff(i%) = p
NEXT i%

CASE 5
fps%(5) = 350

p = .5
FOR i% = 1 TO 10
p = -p
xp%(i%) = -320 * pp%
x(i%) = -320 * pp%
f(i%) = 0
v(i%) = 13 * pp%
t(i%) = .15
el(i%) = 7
kat%(i%) = pp%
ff(i%) = 1.5 + p
NEXT i%


END SELECT

REM ------------- Output ---------------

att% = 0
fps% = 0
donumbers sect%, 0

xp%(11) = 327
x(11) = 327.2
v(11) = -5.799997
ep(11) = .1

DO WHILE fps% < fps%(sl%)


IF pp% = 1 THEN cb% = 0 ELSE cb% = xb% \ 2 + 128
IF xb% <> pb% THEN LINE (xb% + 82, 175)-(xb% + 82, 180), cb%: xb% = xb% - pp%

fps% = fps% + 1
py% = -320

IF v(11) >= 0 THEN ep(11) = 0: v(11) = 0: GOTO 317337
physix 3, 11
writenumbers 11
317337

IF skata% = 1 THEN GOTO 31337
IF v(12) >= 0 THEN ep(12) = 0: v(12) = 0: skata% = 1
physix 3, 12
writenumbers 12
31337

FOR i% = 1 TO 10
py% = py% + 320
physix 2, i%
writetext xp%(i%), i%, 1, 20, clrs%(i%)
NEXT i%

IF vsync% = 1 THEN endcpumeter
IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8
IF vsync% = 1 THEN startcpumeter
LOOP
endcpumeter
WHILE INKEY$ <> "": WEND

LOOP

SUB barend

SHARED vsync%

FOR i% = 0 TO 4
LINE (80, 173 + i%)-(240, 173 + i%), 15
LINE (80, 182 - i%)-(240, 182 - i%), 15
LINE (80, 172 + i%)-(240, 172 + i%), 0
LINE (80, 183 - i%)-(240, 183 - i%), 0
IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8
NEXT i%

FOR i% = 0 TO 80
PSET (80 + i%, 177), 0: PSET (80 + i%, 178), 0
PSET (240 - i%, 177), 0: PSET (240 - i%, 178), 0
IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8
NEXT i%


END SUB

SUB delay (a%)

SHARED vsync%

FOR ii% = 1 TO a%
IF vsync% < 3 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8
NEXT ii%

END SUB

SUB donumbers (sect%, cn%)

DIM dpg%(2)

IF cn% = 1 THEN xpg% = spg%(sect%) ELSE xpg% = pg%(sect%)

dpg%(0) = xpg% \ 100
xpg% = xpg% - dpg%(0) * 100
dpg%(1) = xpg% \ 10
xpg% = xpg% - dpg%(1) * 10
dpg%(2) = xpg%


i% = cn% * 1536 + 384

FOR y% = 0 TO 15
FOR l% = 0 TO 2
FOR x% = 0 TO 15

cnt%(i%) = nmb%(dpg%(l%) * 256 + x% + y% * 16)
i% = i% + 1

NEXT x%
NEXT l%
NEXT y%

END SUB

SUB endcpumeter

OUT &H3C8, 0
OUT &H3C9, 0
OUT &H3C9, 0
OUT &H3C9, 0

END SUB

SUB fadefromcolor (a, c, t, r, g, B)

SHARED vsync%

FOR s = 1 TO t

FOR k = a TO c
OUT &H3C8, k
OUT &H3C9, r + s * ((r(k) - r) / t)
OUT &H3C9, g + s * ((g(k) - g) / t)
OUT &H3C9, B + s * ((B(k) - B) / t)
NEXT k

IF vsync% < 3 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8
NEXT s


END SUB

SUB fadetocolor (a, c, t, r, g, B)

SHARED vsync%

FOR s = 1 TO t
FOR k = a TO c
OUT &H3C8, k
OUT &H3C9, r(k) + s * ((r - r(k)) / t)
OUT &H3C9, g(k) + s * ((g - g(k)) / t)
OUT &H3C9, B(k) + s * ((B - B(k)) / t)
NEXT k

IF vsync% < 3 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8

NEXT s


END SUB

SUB fadetocolorscale (a, c, t, r, g, B)

SHARED vsync%

FOR s = 1 TO t
FOR k = a TO c
mo = (r(k) \ 1.5 + g(k) + B(k) \ 2) \ 2.16
OUT &H3C8, k
OUT &H3C9, r(k) + s * (((r * mo) \ 63 - r(k)) / t)
OUT &H3C9, g(k) + s * (((g * mo) \ 63 - g(k)) / t)
OUT &H3C9, B(k) + s * (((B * mo) \ 63 - B(k)) / t)
NEXT k

IF vsync% < 3 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8

NEXT s


END SUB

SUB getcolors (sect%)

c$ = " "
f$ = "tcolours.dat"

OPEN f$ FOR BINARY AS #1

k% = 0
FOR i% = 2 TO sect%
k% = k% + spg%(i% - 1) * 10
NEXT i%

k% = k% + (pg%(sect%) - 1) * 10
'LOCATE 2, 1: PRINT k%: SLEEP

l% = 0
FOR i% = 1 + k% TO 10 + k%

GET #1, i%, c$
l% = l% + 1
clrs%(l%) = ASC(c$) * 16

NEXT i%

CLOSE

END SUB

SUB getnumbers


i% = 0

f$ = "fonts16a.fnt"
OPEN f$ FOR BINARY AS #1

FOR y% = 1 TO 16
FOR x% = 1 TO 16
i% = i% + 1

GET #1, 62 * 256 + x% - 1 + (y% - 1) * 16, nmb%(i%)

NEXT x%
NEXT y%


FOR l% = 53 TO 61

FOR y% = 1 TO 16
FOR x% = 1 TO 16
i% = i% + 1

GET #1, l% * 256 + x% - 1 + (y% - 1) * 16, nmb%(i%)

NEXT x%
NEXT y%
NEXT l%

CLOSE

END SUB

SUB palget

FOR k% = 0 TO 255
OUT &H3C7, k%
r(k%) = INP(&H3C9)
g(k%) = INP(&H3C9)
B(k%) = INP(&H3C9)

NEXT k%

END SUB

SUB physix (toing%, pn%)

SHARED att%, pp%
SELECT CASE toing%

CASE 1

t(pn%) = t(pn%) + .001
v(pn%) = v(pn%) + f(pn%) * t(pn%)
x(pn%) = x(pn%) + v(pn%)
REM IF v >= 0 THEN v = 0: f = 0
xp%(pn%) = x(pn%)
IF xp%(pn%) = x(pn%) THEN x(pn%) = x(pn%) + (xp%(pn%) - x(pn%))

CASE 2

t(pn%) = t(pn%) + .0001
v(pn%) = v(pn%) + f(pn%) * t(pn%)
x(pn%) = x(pn%) + v(pn%)

IF pp% * x(pn%) > 0 AND kat%(pn%) = pp% THEN x(pn%) = 0: f(pn%) = -el(pn%) * pp%: kat%(pn%) = -pp%: att% = 1
IF pp% * x(pn%) < 0 AND kat%(pn%) = -pp% THEN x(pn%) = 0: f(pn%) = el(pn%) * pp%: kat%(pn%) = pp%: att% = 1
IF att% = 0 THEN xp%(pn%) = x(pn%) ELSE xp%(pn%) = x(pn%) / ff(pn%)

CASE 3

v(pn%) = v(pn%) + ep(pn%)
x(pn%) = x(pn%) + v(pn%)
xp%(pn%) = x(pn%)
IF xp%(pn%) = x(pn%) THEN x(pn%) = x(pn%) + (xp%(pn%) - x(pn%))

CASE 4

ep(pn%) = ep(pn%) + epe(pn%)
v(pn%) = v(pn%) + ep(pn%)
x(pn%) = x(pn%) + v(pn%)
xp%(pn%) = x(pn%)
IF xp%(pn%) = x(pn%) THEN x(pn%) = x(pn%) + (xp%(pn%) - x(pn%))

CASE ELSE

END SELECT


END SUB

SUB preparation1

SHARED starn%

' ============================== Some precalcs =======================

FOR i% = 1 TO 64
p256%(i%) = (i% - 1) * 256
NEXT i%

' ======================================================================


REM ------------ Pallete settings --------------


FOR i% = 1 TO 16
ci% = (i% - 16) * 4.2
ri% = ci%
gi% = ci%
bi% = ci%
OUT &H3C8, i%
OUT &H3C9, ri%
OUT &H3C9, gi%
OUT &H3C9, bi%
NEXT i%

FOR i% = 1 TO 16
ci% = (i% - 16) * 4.2
ri% = ci%
gi% = 0
bi% = 0
OUT &H3C8, i% + 16
OUT &H3C9, ri%
OUT &H3C9, gi%
OUT &H3C9, bi%
NEXT i%

FOR i% = 1 TO 16
ci% = (i% - 16) * 4.2
ri% = 0
gi% = ci%
bi% = 0
OUT &H3C8, i% + 32
OUT &H3C9, ri%
OUT &H3C9, gi%
OUT &H3C9, bi%
NEXT i%

FOR i% = 1 TO 16
ci% = (i% - 16) * 4.2
ri% = 0
gi% = 0
bi% = ci%
OUT &H3C8, i% + 48
OUT &H3C9, ri%
OUT &H3C9, gi%
OUT &H3C9, bi%
NEXT i%

FOR i% = 1 TO 16
ci% = (i% - 16) * 4.2
ri% = ci%
gi% = ci%
bi% = 0
OUT &H3C8, i% + 64
OUT &H3C9, ri%
OUT &H3C9, gi%
OUT &H3C9, bi%
NEXT i%

FOR i% = 1 TO 16
ci% = (i% - 16) * 4.2
ri% = ci%
gi% = 0
bi% = ci%
OUT &H3C8, i% + 80
OUT &H3C9, ri%
OUT &H3C9, gi%
OUT &H3C9, bi%
NEXT i%


FOR i% = 1 TO 16
ci% = (i% - 16) * 4.2
ri% = 0
gi% = ci%
bi% = ci%
OUT &H3C8, i% + 96
OUT &H3C9, ri%
OUT &H3C9, gi%
OUT &H3C9, bi%
NEXT i%

FOR i% = 1 TO 80
OUT &H3C8, i% + 127
OUT &H3C9, 63
OUT &H3C9, i% / 1.3
OUT &H3C9, 0
NEXT i%

OUT &H3C8, 220
OUT &H3C9, 63
OUT &H3C9, 63
OUT &H3C9, 63

END SUB

SUB preparation2

SHARED vsync%

getnumbers

REM ------------- Bara --------------

FOR i% = 0 TO 5
LINE (160, 178 - i%)-(160, 177 + i%), 15, B
IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8
NEXT i%

FOR i% = 0 TO 80
LINE (160 - i%, 173)-(160 + i%, 182), 15, B
LINE (161 - i%, 174)-(159 + i%, 181), 0, B
IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8
NEXT i%



END SUB

SUB preparewriter (sect%)

SHARED xb%, pb%, pp%, vsync%

c$ = " "
f$ = "itfnote.dat"
kf = 0
OPEN f$ FOR BINARY AS #1


REM  ---------- vriskimo Header position -------

kf = sppg(sect%)

FOR i% = 2 TO pg%(sect%)
GET #1, kf, c$
c% = ASC(c$)
kf = kf + c% + 201
NEXT i%


REM  ---------- Parsimo pliroforion apo Header kai letter positions --------

GET #1, kf, c$
ltp% = ASC(c$)

DIM ltp%(ltp%)

FOR lt% = 1 TO ltp%
kf = kf + 1
GET #1, kf, c$
ltp%(lt%) = ASC(c$)
NEXT lt%


REM  ---------- Parsimo keimenou 20*10 ---------------

plne% = 0
FOR lne% = 1 TO 10

FOR xl% = 1 TO 20


plne% = plne% + 1
kf = kf + 1

GET #1, kf, c$
txt%(plne%) = ASC(c$)


NEXT xl%

NEXT lne%

CLOSE



REM  ----------  Oikonomiko etoimasma ton grafikon ton xaraktiron ------

f$ = "fonts16a.fnt"
OPEN f$ FOR BINARY AS #1

plt% = 0
FOR lt% = 1 TO ltp%

IF pp% = 1 THEN cb% = 0 ELSE cb% = xb% \ 2 + 128
IF xb% <> pb% THEN LINE (xb% + 82, 175)-(xb% + 82, 180), cb%: xb% = xb% - pp%
IF vsync% < 2 THEN WAIT &H3DA, 8: WAIT &H3DA, 8, 8

kf = 0
FOR y% = 1 TO 16
FOR x% = 1 TO 16

plt% = plt% + 1
kf = kf + 1
GET #1, kf + ltp%(lt%) * 256, c$
c% = ASC(c$)
ltr%(plt%) = c%

NEXT x%
NEXT y%

NEXT lt%

CLOSE



END SUB

SUB startcpumeter

OUT &H3C8, 0
OUT &H3C9, 63
OUT &H3C9, 0
OUT &H3C9, 0

END SUB

SUB writenumbers (boing%)

i% = (boing% - 11) * 1536
IF boing% = 11 THEN cntp% = 16: clr% = 16 ELSE cntp% = 256: clr% = 64

FOR y% = 1 TO 32
DEF SEG = &HA000 + (xp%(boing%) + y%) * 20
FOR x% = 1 TO 48

POKE x% + cntp%, cnt%(i%) + clr%
i% = i% + 1

NEXT x%
NEXT y%
END SUB

SUB writetext (xtp%, lne%, ag%, bg%, clr%)

SHARED px%, c1%, x%, y%, py%

xp% = -16 + xtp%
plne% = (lne% - 1) * 20

FOR xl% = ag% TO bg%
xp% = xp% + 16
IF xp% < -15 OR xp% > 319 THEN GOTO 131
ltr% = txt%(plne% + xl%)
pltr% = p256%(ltr%)
c1% = pltr%
IF xp% < 0 OR xp% > 303 THEN GOTO 132


FOR y% = 1 TO 16
DEF SEG = &HA000 + py%
py% = py% + 20

FOR x% = 1 TO 16
c1% = c1% + 1

POKE xp% + x%, ltr%(c1%) + clr%

NEXT x%
NEXT y%
py% = py% - 320

GOTO 131

132


FOR y% = 1 TO 16
DEF SEG = &HA000 + py%
py% = py% + 20

FOR x% = 1 TO 16
c1% = c1% + 1
xpx% = xp% + x%

IF xpx% > -1 AND xpx% < 320 THEN POKE xpx%, ltr%(c1%) + clr%


NEXT x%
NEXT y%
py% = py% - 320


131
NEXT xl%

END SUB

